package com.zj.HJ;

import java.util.Scanner;

public class HJ100 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();

        System.out.println(getRes(num));
    }

    public static int getRes(int num) {
        int a1 = 2, a2 = 5, sum = a1;
        if (num == 1) {
            return sum;
        } else {
            for (int i = 1; i < num; i++) {
                sum += a1 + i * (a2 - a1);
            }
        }
        return sum;
    }
}
